package com.sixth.controller;

import com.sixth.entity.Course;
import com.sixth.entity.CourseCheck;
import com.sixth.entity.Subject;
import com.sixth.service.CourseCheckServicer;
import com.sixth.until.CommonResult;
import com.sixth.until.TableResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: self-tui-education
 * @description:
 * @author: 老魏
 * @create: 2022-04-21 23:02
 **/
@RestController
@RequestMapping("core/checkCourse")
public class CourseCheckController {
    @Autowired
    private CourseCheckServicer checkService;
    //查询全部
    @PostMapping("/findCourseCheck/{pageCurrent}/{pageSize}")
    public TableResult findCourseCheck(@PathVariable Integer pageCurrent, @PathVariable Integer pageSize, @RequestBody Course course){
        return checkService.findCourseCheck(pageCurrent,pageSize,course);
    }
    //提交审核
    @PostMapping("/updateCourseCheck")
    public CommonResult updateCourseCheck(@RequestBody CourseCheck courseCheck){
        System.out.println(courseCheck.getCheckContent());
        return checkService.updateCourseCheck(courseCheck);
    }

}
